Skip to content

Instantly share code, notes, and snippets.

@patriknyblad
patriknyblad / xcrun_simctl_cheatsheet.md
Last active May 10, 2024 07:36
iOS Simulator Terminal Commands `$ xcrun simctl`

Managing iOS Simulators

List all simulators created

$ xcrun simctl list --json

Delete old and unavailable simulators

$ xcrun simctl delete unavailable
@ehizman
ehizman / UsernamePasswordAuthenticationFilter.java
Last active May 10, 2024 07:34
Implementation of a UsernamePassword Authentication Filter
/*
* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 10, 2024 07:33
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@Flowgun
Flowgun / Accelerated Scrolling 1.5.ahk
Last active May 10, 2024 07:32 — forked from jasonsparc/Accelerated Scrolling 1.3.ahk
Accelerated Scrolling v1.5
/* ; _____________________________________________________________________________
; Improved Accelerated Scrolling By Flowgun
; original Accelerated Scrolling: V1.3 By BoffinbraiN
; Major Changes (v1.5):
; - Reloading at Logon/unlocking: The mouse hook can get
; released when the session is locked/closed. Now the
; script reloads itself to rehook the ScrollWheel hotkeys
; - changed the default acceleration values.
; Major Changes (v1.4):
@a-sync
a-sync / deobf.cmd
Last active May 10, 2024 07:29
batch obfuscator / deobfuscator
@echo off & setlocal
if "%~1"=="" exit /b
if /i "%~x1" neq ".bat" if /i "%~x1" neq ".cmd" exit /b
<"%~1" ((for /l %%N in (1 1 8) do pause)>nul&findstr "^">"%~n1__%~x1")
@indyfromoz
indyfromoz / VNC_Server_On_Ubuntu_22.04LTS.md
Last active May 10, 2024 07:25
VNC Server setup on Ubuntu 22.04 LTS

Setup

Install TigerVNC -

$ sudo apt install tigervnc-standalone-server

Configure VNC Server by running

@meramsey
meramsey / gist:b9c98032a34612a1a29f9fd2059156a5
Created February 4, 2023 01:07 — forked from lavalake/gist:d83a5bc14284161433019475013996d1
Android activity manager "am" command help
adb shell am
Activity manager (activity) commands:
help
Print this help text.
start-activity [-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--sampling INTERVAL] [--streaming] [-R COUNT] [-S]
[--track-allocation] [--user <USER_ID> | current] <INTENT>
Start an Activity. Options are:
-D: enable debugging
-N: enable native debugging
@tsohr
tsohr / gist:5711945
Created June 5, 2013 06:15
Android activity manager "am" command help
adb shell am
usage: am [subcommand] [options]
usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--R COUNT] [-S] [--opengl-trace] <INTENT>
am startservice <INTENT>
am force-stop <PACKAGE>
am kill <PACKAGE>
am kill-all
am broadcast <INTENT>
am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]
@MichaelSimons
MichaelSimons / RetrievingDockerImageSizes.md
Last active May 10, 2024 07:19
Retrieving Docker Image Sizes

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size

@gabe565
gabe565 / change-arc-icon.md
Last active May 10, 2024 07:17
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy